package com.gitee.dupe.authority.dto;

import com.gitee.dolt.model.RemoteData;
import com.gitee.dupe.authority.entity.Role;
import com.gitee.dupe.authority.enumeration.UserStateEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author LYH
 * @since 2020-06-30
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "User对象")
public class UserDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "用户名")
    private String account;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @ApiModelProperty(value = "状态")
    private UserStateEnum state;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "用户分类")
    private String groups;

    @ApiModelProperty(value = "组织id")
    private RemoteData<Long, String> orgId;

    @ApiModelProperty(value = "组织名称")
    private String orgName;

    private LocalDateTime createTime;

    @ApiModelProperty(value = "角色", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    private List<Role> roles;

}
